<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Gitosis</title>
</head><body>[安装包]<br/>
sudo apt-get install git-core openssh-server openssh-client gitosis<br/>
[建立GIT用户]<br/>
sudo useradd -m git<br/>
sudo passwd git<br/>
[建立仓库存储点]<br/>
sudo mkdir /home/repo<br/>
sudo chown git:git /home/repo<br/>
sudo chmod 700 /home/repo<br/>
[建立gitosis仓库]<br/>
# -u 后面接用户.如果不存在.则会在/srv目录下建立用户目录.<br/>
sudo -H -u git gitosis-init &lt; ~/.ssh/id_rsa.pub<br/>
</body></html>